From: Jim Blandy Date: Fri, 19 Mar 1993 17:38:48 +0000 (+0000) Subject: * tex-mode.el (tex-send-command): Fix the command sent so that no X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96795 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=4f45adda3618c8934f4dce94f930b4fc190b225f;p=emacs.git * tex-mode.el (tex-send-command): Fix the command sent so that no blank is inserted when replacing the asterisk with the file name. --- diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 4df59532607..cee97ffa407 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -656,12 +656,15 @@ preceded by a blank, to COMMAND. If FILE is nil, no substitution will be made in COMMAND. COMMAND can be any expression that evaluates to a command string." (save-excursion (let* ((cmd (eval command)) - (star (string-match "\\*" cmd))) + (star (string-match "\\*" cmd)) + (front (substring cmd 0 star)) + (back (if star (substring cmd (1+ star)) ""))) (comint-proc-query (get-process "tex-shell") - (concat (substring cmd 0 star) - (if file (concat " " file) "") - (if star (substring cmd (1+ star) nil) "") - (if background "&\n" "\n")))))) + (concat + (if file (if star (concat front file back) + (concat cmd " " file)) + cmd) + (if background "&\n" "\n")))))) (defun tex-delete-last-temp-files () "Delete any junk files from last temp file."